package site.liuming.truismcms.bo;

import site.liuming.truismcms.web.pojo.Blog;

import java.util.Date;
import java.util.List;

/**
 * 归档页 BO
 */
public class ArchiveBo implements Comparable<ArchiveBo> {

  private Date date;

  private List<Blog> blogList;

  public ArchiveBo() {
  }

  public ArchiveBo(Date date, List<Blog> blogList) {
    this.date = date;
    this.blogList = blogList;
  }

  public Date getDate() {
    return date;
  }

  public void setDate(Date date) {
    this.date = date;
  }

  public List<Blog> getBlogList() {
    return blogList;
  }

  public void setBlogList(List<Blog> blogList) {
    this.blogList = blogList;
  }

  @Override
  public int compareTo(ArchiveBo o) {
    return - this.date.compareTo(o.date);
  }
}
